package com.echo.neocommunity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student implements Cloneable{
    private String username="hello";
    private int id;
    private User user=new User("echo first");

    @Override
    protected Student clone() throws CloneNotSupportedException {
        Student clone = (Student) super.clone();
        clone.user= (User) this.getUser().clone();
        return clone;
    }
}
